package com.you.mybatis.base.util;

import java.io.Closeable;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *<p>
 *关闭操作
 *</p>
 *
 * @author liuyang
 * @date 2018-11-22 Thu 10:32:14
 * @since 1.0.0
 */
public class CloseUtil {

    private static final Logger LOG = LoggerFactory.getLogger(CloseUtil.class);

    public static void close(Closeable closeable) {
        if (null != closeable) {
            try {
                closeable.close();
            } catch (IOException e) {
                LOG.error("释放资源异常：{}", e);
            }
        }
    }

}
